﻿<UserControls:ScrumUserControl x:Class="ScrumTable.UI.View.WinTouch.UserControls.StackedBugControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008" xmlns:Localization="clr-namespace:ScrumTable.UI.View.Localization;assembly=ScrumTable.UI.View" xmlns:UserControls="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls"
                               xmlns:CustomControl="clr-namespace:ScrumTable.UI.View.CustomControl;assembly=ScrumTable.UI.View"
                               AllowDrop="True" s:SurfaceDragDrop.Drop="OnDrop" HorizontalAlignment="Stretch" x:Name="StackedUserStorie"  HorizontalContentAlignment="Stretch">
    <Grid HorizontalAlignment="Stretch" >
        <Grid Name="Grid" HorizontalAlignment="Stretch" >
            <Grid.Resources>
                <LinearGradientBrush x:Key="ColorGreen" MappingMode="RelativeToBoundingBox" EndPoint="0,0.5" StartPoint="1,0.5">
                    <GradientStop Color="#FF459451" />
                    <GradientStop Color="#FFEAF7E6" Offset="0.987"/>
                    <GradientStop Color="#FF74EB50" Offset="0.655"/>
                    <GradientStop Color="#FF22D015" Offset="0.263"/>
                </LinearGradientBrush>
                <LinearGradientBrush  x:Key="ColorRed" MappingMode="RelativeToBoundingBox" EndPoint="0,0.5" StartPoint="1,0.5">
                    <GradientStop Color="#FF4D010F" />
                    <GradientStop Color="#FFF9C1D8" Offset="0.987"/>
                    <GradientStop Color="#FFEF6464" Offset="0.645"/>
                    <GradientStop Color="#FFB81313" Offset="0.194"/>
                </LinearGradientBrush>
            </Grid.Resources>
        </Grid>
        <Grid>
            <ItemsControl Name="ItemContainerControl" ItemsSource="{Binding PlacedControls, ElementName=StackedUserStorie}" Background="Transparent"
                      ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <UserControls:BugControl TouchDown="OnItemControlTouchDown" MouseDown="OnItemControlMouseDown" PreviewMouseDown="OnItemPreviewDown" PreviewTouchDown="OnItemPreviewDown"/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <CustomControl:WrapPanelAnimated/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </Grid>
</UserControls:ScrumUserControl>
